﻿package chapter_04_Homework;

import java.util.Scanner;

public class Work_09_Test {
	public static void main(String[] args) {
		Work_09_Master master =new Work_09_Master("王先生",100);
		Scanner sc =new  Scanner(System.in);
		System.out.println("欢迎来到宠物店");
		System.out.println("请选择要领的宠物：（1.狗狗 2.企鹅）");
		int typeId=sc.nextInt();
		Work_09_Pet pet=master.getPet(typeId);
		if(pet!=null){
			System.out.println("领养成功");
			master.feed(pet);
			master.play(pet);
		}else{
			System.out.println("对不起，没有此类型宠物，领养失败");
		}
	}
}
